Skip to content

Inscoper::ValueCondition

ValueCondition class defines a condition based on a sub-device value. More...

#include <ValueCondition.h>

Public Functions

Name
ValueCondition(const Inscoper::SubDeviceId & subDeviceId, const std::string & condition, bool negated =false)
Constructor with sub-device ID and condition.
ValueCondition()
Default constructor.
~ValueCondition()
Default destructor.
const Inscoper::SubDeviceId getSubDeviceId() const
Get the sub-device ID.
void setSubDeviceId(const Inscoper::SubDeviceId & subDeviceId)
Set the sub-device ID.
const std::string & getCondition() const
Get the condition.
void setCondition(const std::string & condition)
Set the condition.
bool isNegated() const
Check if the condition is negated.
void setNegated(bool negated)
Set whether the condition is negated.

Detailed Description

class Inscoper::ValueCondition;

ValueCondition class defines a condition based on a sub-device value.

Represents a condition where a sub-device must meet a certain value criterion for a recipe element to be executed.

Public Functions Documentation

function ValueCondition

ValueCondition(
    const Inscoper::SubDeviceId & subDeviceId,
    const std::string & condition,
    bool negated =false
)

Constructor with sub-device ID and condition.

Parameters:

  • subDeviceId : The associated sub-device ID of the value Condition
  • condition : The value condition

Initializes a new instance of the ValueCondition class with a sub-device ID and a condition string.

function ValueCondition

ValueCondition()

Default constructor.

Initializes a new instance of the ValueCondition class.

function ~ValueCondition

~ValueCondition()

Default destructor.

function getSubDeviceId

const Inscoper::SubDeviceId getSubDeviceId() const

Get the sub-device ID.

Return: The sub-device ID

Retrieves the ID of the sub-device associated with this condition.

function setSubDeviceId

void setSubDeviceId(
    const Inscoper::SubDeviceId & subDeviceId
)

Set the sub-device ID.

Parameters:

  • subDeviceId : The sub-device ID

Sets the ID of the sub-device associated with this condition.

function getCondition

const std::string & getCondition() const

Get the condition.

Return: The condition

Retrieves the condition associated with this value condition.

function setCondition

void setCondition(
    const std::string & condition
)

Set the condition.

Parameters:

  • condition : The condition

Sets the condition associated with this value condition.

function isNegated

bool isNegated() const

Check if the condition is negated.

Return: True if the condition is negated

When true, the element fires when the sub-device value does NOT match the condition, instead of when it does match.

function setNegated

void setNegated(
    bool negated
)

Set whether the condition is negated.

Parameters:

  • negated : True to negate the condition, false otherwise

Defines whether the condition logic is inverted. When negated, the element fires when the sub-device value does not match the condition.


Updated on 2026-06-23 at 10:35:20 +0200